package entity

import "time"

type Project struct {
	ID              string    `gorm:"column:id" json:"id"`
	DSLSource       string    `gorm:"column:dsl_source" json:"source"`
	DSLType         string    `gorm:"column:dsl_type" json:"dslType"`
	TriggerType     string    `gorm:"column:trigger_type" json:"triggerType"`
	WorkflowName    string    `gorm:"column:workflow_name" json:"name"`
	WorkflowRef     string    `gorm:"column:workflow_ref" json:"workflowRef"`
	WorkflowVersion string    `gorm:"column:workflow_version" json:"workflowVersion"`
	Description     string    `gorm:"column:workflow_description" json:"description"`
	Enabled         IntBool   `gorm:"column:enabled" json:"enabled"`
	Mutable         IntBool   `gorm:"column:mutable" json:"mutable"`
	GitRepoId       string    `gorm:"column:git_repo_id" json:"gitRepoId"`
	StartTime       time.Time `gorm:"-"`
	LatestTime      time.Time `gorm:"-"`
	NextTime        time.Time `gorm:"-"`
	Status          string    `gorm:"-" json:"status"`
}

func (*Project) TableName() string {
	return "jianmu_project"
}
